package com.ocom.ugcapi.client;

import com.ocom.common.constant.AccessServiceUrl;
import com.ocom.common.request.wx.UserAccessPageSetAccessRequest;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.AccessListVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "access")
public interface AccessClientService {

    /*
     * @Description: 人员门禁权限列表
     * @Author: lu
     * @Date: 2022/1/12 10:53
     * @param companyId: 单位编号
     * @param pId: 人员编号
     * @return: com.ocom.common.resp.Result
     **/
    @PostMapping(AccessServiceUrl.URL_WxGetAccessByUser)
    public Result<List<AccessListVo>> getAccessByUser(@RequestParam("companyId")Long companyId, @RequestParam("pId")Long pId);

    /*
     * @Description:人员门禁权限新增/修改
     * @Author: lu 
     * @Date: 2022/1/12 16:00
     * @param request:  
     * @return: com.ocom.common.resp.Result
     **/
    @PostMapping(AccessServiceUrl.URL_WxChangeAccess)
    public Result setAccess(@RequestBody UserAccessPageSetAccessRequest request);

}
